package org.xlh.springboot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.xlh.springboot.component.YamlMessageConverter;

import java.util.List;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    // 添加自定义的转换器
    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(new YamlMessageConverter());
    }
}
